package com.zjw.algorithm.utils;


public class ListNode {
    public int val;
    public ListNode next;

    public ListNode() {
    }

    public ListNode(int val) {
        this.val = val;
    }

    public ListNode(int val, ListNode next) {
        this.val = val;
        this.next = next;
    }


    @Override
    public String toString() {
        return String.valueOf(val);
    }

    public static void main(String[] args) {
        System.out.println(Utils.toString(Utils.reverse(Utils.asNodeList(new int[]{1, 2, 3, 4, 5}))));
    }

}


